﻿using Sasa.QualityTools.CodeAnalysis.FxCopIntegrator.ViewModels;
using System;
using System.Collections.Generic;
using System.Threading;

namespace Sasa.QualityTools.CodeAnalysis.FxCopIntegrator.Searching
{
    internal class CheckIdSearcherGenerator : ISearcherGenerator
    {
        public Func<ProblemViewModel, bool> Generate(string word)
        {
            var culture = Thread.CurrentThread.CurrentUICulture;
            return (ProblemViewModel o) => o.CheckId != null && o.CheckId.ToUpper(culture).Contains(word.ToUpper(culture));
        }
    }
}
